package org.jeecg.modules.miniAppCustomerEndPoint.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.modules.miniAppCustomerEndPoint.enums.JxOrderStateEnum;

import java.util.Date;

@Data
@TableName("jx_order_detail")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "jx_order_detail对象", description = "订单详情表")
public class JxOrderDetailDo {

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String Id;

    @TableField(value = "ORDER_ID")
    private String orderId;

    @TableField(value = "site_id")
    private String siteId;

    @TableField(value = "user_id")
    private String userId;

    @TableField(value = "name_taking_meal")
    private String nameTakingMeal;

    @TableField(value = "phone_taking_meal")
    private String phoneTakingMeal;

    @TableField(value = "picking_address")
    private String pickingAddress;

    @TableField(value = "store_id")
    private String storeId;

    @TableField(value = "food_id")
    private String foodId;

    /**
     * 自选套餐，最终打印的菜名名，是规格拼接起来的，而不是 foodName
     */
    @TableField(value = "food_print_name")
    private String foodPrintName;

    /**
     * 菜品销售价
     */
    @TableField(value = "sale_price")
    private Integer salePrice;

    /**
     * 份数
     */
    @TableField(value = "count")
    private Integer count;

    /**
     * 用户选择的规格，比如 ["荤菜1","荤菜3","素菜4"] 或 ["不辣","不加葱花"]
     */
    @TableField(value = "SPECIFICATION")
    private String specification;

    /**
     * 用户填写的备注信息
     */
    @TableField("note")
    private String note;

    /**
     * 订单状态
     */
    @TableField("state")
    private JxOrderStateEnum state;

    /**
     * 每一份独立包装，贴标签的快餐，都有一个唯一的取餐编码
     */
    @TableField("pickup_code")
    private Integer pickupCode;

    /**
     * 每一天的订单，拥有相同的此标准，为数值形式的 yyyyMMdd ，比如 20230105；用来标记某一天的所有订单，便于查找某一天订单时，
     * 能够根据此字段创建的索引，快速查找到；此字段也业务功能意义较弱，主要是为了便于查询时，通过对该字段创建索引，提升查询性能
     */
    @TableField("date_flag")
    private Integer dateFlag;

    @TableField(value = "create_time")
    private Date createTime;

    @TableField(value = "update_time")
    private Date updateTime;
}
